package org.ns.summer.classpath;

import org.ns.summer.classpath.scan.ScanFile;
import org.ns.summer.classpath.scan.ScanFileExecute;
import org.ns.summer.classpath.scan.factory.DirAndJarScanFileFactory;
import org.ns.summer.core.ResourceUtils;

import java.net.URLDecoder;
import java.util.List;

//        String path ="jar:file:/Users/zhangxingyu/cache/java/";
public class ClassPathDemo {
    public static void main(String[] args) throws Exception {

        String path = ResourceUtils.getClasspathRoot(ClassPathDemo.class);
        ScanFileExecute scanFileExecute = DirAndJarScanFileFactory.getScanFileExecute();
        scanFileExecute.addPrefixLimit("org");
        List<ScanFile> scanFiles = scanFileExecute.execScan(path);
        for (ScanFile scanFile : scanFiles) {
            System.out.println(scanFile);
        }
    }
}
